home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 January / macformat-033.iso / mac / Shareware City / Developers / ABox.v1.8 / Header Files / ABUEnv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-23  |  3.2 KB  |  120 lines  |  [TEXT/MMCC]

  1. /*    
  2.     Copyright © 1991-1995 by TopSoft Inc.  All rights reserved.
  3.  
  4.     You may distribute this file under the terms of the TopSoft
  5.     Artistic License, accompanying this package.
  6.     
  7.     This file was developed by George (ty) Tempel in connection with TopSoft, Inc..
  8.     See the Modification History for more details.
  9.  
  10. Product
  11.     About Box
  12.  
  13. FILE
  14.     ABUEnv.h
  15.  
  16. NAME
  17.     ABUEnv.h, part of the ABox project source code,
  18.     a utility class, mixed into other classes, responsible for 
  19.     handling the AboutBox environment stuff.
  20.  
  21. DESCRIPTION
  22.     This file contains defines for the about box modules.
  23.     
  24. DEVELOPED BY
  25.     George (ty) Tempel                netromancr@aol.com
  26.     All code in this file, and its associated header file was
  27.     Created by George (ty) Tempel in connection with the TopSoft, Inc.
  28.     "FilterTop" application development, except where noted.
  29.  
  30. CARETAKER - George (ty) Tempel <netromancr@aol.com>
  31.      Please consult this person for any changes or suggestions to this file.
  32.  
  33. MODIFICATION HISTORY
  34.  
  35.     dd mmm yy    -    xxx    -    patchxx: description of patch
  36.     9 June 94    -    ty    -    Initial Version Created
  37.     20-july-94    -    ty    -    initial version released
  38.     23-may-95    -    ty    -    changes for compatibility with the CodeWarrior CW6
  39.                             release and the associated Universal Headers from Apple:
  40.                             most methods that returned references now have "Ref" at
  41.                             the end of their methods names to prevent possible collisions
  42.                             with datatypes and classes of the same name (older versions
  43.                             of the compiler didn't have a problem with this).
  44.  
  45. */
  46.  
  47. /*===========================================================================*/
  48.  
  49. /*========== Exclusion Macros ============*/
  50.  
  51. #pragma    once
  52.  
  53. #ifndef    _ABUEnv_
  54. #define    _ABUEnv_
  55.  
  56.  
  57. /*============ Header Files ==============*/
  58.  
  59. /*=========== External Linkage ===========*/
  60.  
  61. /*================ Macros ================*/
  62.  
  63. /*============== Constants ===============*/
  64.  
  65.  
  66. /*================ Enums =================*/
  67.  
  68. /*=============== Structs ================*/
  69.  
  70. /*=============== Typedefs ===============*/
  71.  
  72.  
  73. /*=========== Class Definitions ==========*/
  74.  
  75. class    ABUEnv
  76. {
  77.     public:
  78.                         ABUEnv(void);
  79.         virtual            ~ABUEnv(void);
  80.     
  81.         virtual    Boolean    IsPresent(void);
  82.                 Boolean    Feature(long mask);
  83.                 Boolean    Attribute(short inBitToTest);
  84.         
  85.         virtual    OSErr    Initialize(void);
  86.         virtual    OSErr    Close(void);
  87.         virtual    void    CleanUp(void);
  88.         virtual    OSErr    Begin(void);
  89.         virtual    OSErr    End(void);
  90.  
  91.                 Boolean WasCheckedRef(void) const { return this->CheckedRef() == true; }
  92.                 Boolean WasntCheckedRef(void) const { return ! this->WasCheckedRef(); }
  93.                 
  94.                 long    GetResult(void) const { return this->ResultRef(); }
  95.                 
  96.     protected:
  97.                 OSErr        CheckGestalt(OSType inGestaltSelector);
  98.         static    Boolean     GestaltAvailable(void);
  99.         static    Boolean        TrapAvailable(short theTrap);
  100.         static    short        NumToolboxTraps(void);
  101.         static    TrapType    GetTrapType(short theTrap);
  102.         
  103.                 Boolean    mCheckedRef;
  104.                 Boolean    mIndicator;
  105.                 long    mResult;
  106.                 
  107.                 Boolean& CheckedRef(void) const { return this->mCheckedRef; }
  108.                 Boolean& IndicatorRef(void) const { return this->mIndicator; }
  109.                 long& ResultRef(void) const { return this->mResult; }
  110.                 void SetResult(long inResult)  { this->mResult = inResult; }
  111.     private:
  112. };
  113.  
  114.  
  115. /*========== Function Prototypes =========*/
  116.  
  117.  
  118. #endif    // _ABUEnv_
  119.  
  120.